package cn.hank.service.impl;

import cn.hank.dao.IAccountDao;
import cn.hank.pojo.Account;
import cn.hank.service.IAccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class AccountServiceImpl implements IAccountService {

    @Autowired
    private IAccountDao accountDao;

    public void saveAccount(Account account) {

        accountDao.save(account);
    }

    public List<Account> findAllAccount() {
        System.out.println("执行了查询账户service");
        return accountDao.findAll();
    }
}
